package org.grow.mpgo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import org.grow.mpgo.entity.ScoreQueryCondition;
import org.grow.mpgo.entity.StudentScore;

import java.util.List;

/**
 * @Author: xwg
 * @CreateDate: 21-7-12
 */

@Mapper
public interface StudentScoreDao extends BaseMapper<StudentScore> {

    IPage<StudentScore> dynamicQueryPaged(IPage<StudentScore> page,
                                          @Param("qc") ScoreQueryCondition scoreQueryCondition);
    List<StudentScore> dynamicLimitQuery(@Param("qc") ScoreQueryCondition scoreQueryCondition
    ,@Param("pageNum") int pageNum,@Param("pageSize") int pageSize);
    Long dynamicCountQuery(@Param("qc") ScoreQueryCondition scoreQueryCondition);

    StudentScore findByName(@Param("name") String name);

    int updateByName1(@Param("name")String name,
                     @Param("cs")Float classScore);

    int updateByName2(@Param("name")String name,
                     @Param("cs")Float classScore,@Param("version")Integer version);
    int updateByName(@Param("ss") StudentScore studentScore);
}
